<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    let vm = {
        template: `
                    <div ref="hello">hello world</div>
                `,
        setup () {
            const { onBeforeMount, onMounted, ref } = Vue
            const hello = ref(null)
            onMounted(() => {
                console.log('onMounted')
                // 可以获取节点
                console.log(hello.value);
            })
            return { hello }
        }
    }
    let app = Vue.createApp(vm)
    app.mount('#app')
</script>

</html>